<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
use yii\widgets\ListView;
use app\models\Saleorder;


/* @var $this yii\web\View */
/* @var $model app\models\Saleorder */
/* @var $picDataProvider yii\data\ActiveDataProvider */

$this->title = $model->product->name;
$this->params['breadcrumbs'][] = ['label' => '订单', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="product-view">

    <h1><?= Html::encode($this->title) ?></h1>

    <div class="wrapper wrapper-content  animated fadeInRight blog">
    <div class="page-content">
        <div class="panel panel-default">
            <div class="panel-heading"><?= Html::encode("图片") ?> </div>
            <div class="panel-body">
            <?= ListView::widget([
                'dataProvider'=>$picDataProvider,
                'itemView' => '_pic',
            ]);?>
            </div>
        </div>
    </div>
    </div>
    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
            'orderid',
            'auction.periods',
            'user.name',
            'pname',
            'market_val',
            'price',
            'bid_price',
            'num',
            'name',
            'phone',
            'qq',
            'alipay',
            'aliname',
            'province',
            'city',
            'county',
            'detail',
            [
              'attribute'=>'pay_type',
                'value'=>Saleorder::dropdown('pay_type',$model->pay_type),
            ],
            'out_trade_no',
            'trade_no',
            'buyer_email',
            [
                'attribute' => 'state',
                'value'=>Saleorder::dropdown('state',$model->state),
            ],
            [
                'attribute' => 'created_at',
                'format' => ['date', 'php:Y-m-d']
            ],
            [
                'attribute' => 'updated_at',
                'format' => ['date', 'php:Y-m-d']
            ],
        ],
    ]) ?>

</div>
<?php $this->beginBlock('css')?>
<?=Html::cssFile('@hplus/css/style.min.css')?>
<?=Html::cssFile('@hplus/css/font-awesome.min.css?v=4.4.0')?>
<?php $this->endBlock();?>
